package cn.zn.verify.utils;

import cn.zn.base.bean.vo.BaseApiVo;
import cn.zn.verify.strategy.VerifyStrategy;

import java.lang.annotation.Annotation;

public class VerifyUtil<V extends BaseApiVo> {

    private final VerifyStrategy<V> strategy;

    public VerifyUtil(VerifyStrategy<V> strategy) {
        this.strategy = strategy;
    }

    public <T extends Annotation> String verify(Object value, V vo, T annotation) {
        return this.strategy.verify(value, vo, annotation);
    }

}
